package com.itheima.进制;

public class Demo2 {
    public static void main(String[] args) {
        int a = 10;
        int b = 20;

        //一个数被另一个数异或两次,得到的还是这个数本身

        a = a ^ b; // 10 ^ 20
        b = a ^ b; // 10 ^ 20 ^ 20 -> 10
        a = a ^ b; // 10 ^ 20 ^ 10 -> 20
        System.out.println("a = " + a);
        System.out.println("b = " + b);
    }
}
